package cn.edu.nit.sys.export;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;

/**
 * @Author xiaobai
 * @Date 2023/3/18 19:11
 * @Version 1.0.0
 */
@Data
public class UserExport {

    @ExcelProperty("学工号")
    @ColumnWidth(20)
    private String username;
    @ExcelProperty("状态")
    @ColumnWidth(10)
    private String enable;
    @ExcelProperty("用户角色")
    @ColumnWidth(10)
    private String role;

    @ExcelProperty("创建时间")
    @ColumnWidth(20)
    private String createTime;

    public String getEnable() {
        if("1".equals(enable)) {
            return  "正常";
        }
        return  "未启用";
    }
}
